import 'dart:async';

import 'package:flutter/services.dart';

// flutter 调用 native 端功能
class FlutterPlugin_a {
  static const MethodChannel _channel =
      const MethodChannel('flutter_plugin_a:flutter_call_native');

  static Future<String> get platformVersion async {
    final String version = await _channel.invokeMethod('getPlatformVersion');
    return version;
  }

  static Future<int> addInt(int a, int b) async {
    var arguments = <int>[a, b];
    final int result = await _channel.invokeMethod('addInteger', arguments);
    return result;
  }

  static Future<Map> getMapInfo() async {
    final Map result = await _channel.invokeMethod('getDicInfo');
    return result;
  }

  static Future<List> getListInfo() async {
    final List result = await _channel.invokeMethod('getArrayInfo');
    return result;
  }

}
